import observe from './observe';
import Watcher from './Watcher';

const obj = {
    a: {
        c: 1
    },
    d: [1, 2, 3, 4]
}

observe(obj);

new Watcher(obj, 'a.c', (newValue, oldValue) => {
    console.log(newValue, oldValue);
});

console.log(obj.d);

new Watcher(obj, 'd', (newValue, oldValue) => {
    console.log(newValue, oldValue);
});

obj.a.c = 2;
obj.d.push(10);

